package mahmoud.sigir.search;

import sun.beans.editors.StringEditor;


public class DistanceResult implements Comparable<DistanceResult>
{
	int docID;
	double distance;
	double docVectorMag;

	public DistanceResult(int id,double dist,double mag) 
	{
		docID = id;
		distance = dist;
		docVectorMag = mag;
	}

	public int compareTo(DistanceResult o) 
	{
		if(this.distance< o.distance)
			return -1;
		else if (this.distance > o.distance)
			return 1;
		else
		return 0;
	}
	public String toString()
	{
		return docID + "\t" + distance + "\t"+ docVectorMag; 
	}

}